#include <string.h>
#include <stdio.h>

#include <windows.h>

#include "lib.h"
#include "kenolclsql.h"
#include "kenogame.h"

#define MAXOUTCOMESTR	8				// max bytes in outcome
#define MAXGIDSTR		32				// max bytes in GameID

KenoSQL::KenoSQL(char* DBHost, char* DBName, char* DBPassword)
{
}

void
KenoSQL::outcomeToDB(uint8 Outcome, char* Dest)
{
	strcpy(Dest, "hello.");
}

void
KenoSQL::DBtoKenoGameID(const char* src, KenoGameID dest)
{
	// ignore precision, scale, sign from DBDECIMAL since we know it is
	// always 12, 0, 1.
	//
	memcpy(dest, src + 3, 8);	// src is DBDECIMAL* (+3 skips as above)
}

void
KenoSQL::KenoGameIDtoDB(KenoGameID src, char* dest)
{
	sprintf(dest, "stuff");
}

bool8
KenoSQL::createGame(PID pid, bool8 forMoney, KenoGameID gid,
	int32 bet, int32* balance)
{
	return false;
}

bool8
KenoSQL::gameDone(PID pid, bool8 forMoney, KenoGameID gid, 
	int32 outcome, int32 balanceAdjust, int32* balance)
{
	return false;
}

